Word Lookup
Double-clicking any Irish word opens a small popover with its Teanglann dictionary entry. It works on ordinary page text, not only on text the reader is currently speaking.
How a lookup is triggered
| Trigger | Behaviour |
|---|---|
| Double-click a word | Looks that word up. |
Alt+L | Looks up the word currently being spoken, or the last word hovered. |
The popover is an <iframe> pointing at teanglann.ie/ga/?s=<word>&quickie=true. The quickie parameter returns a compact result page designed to sit in a small frame.
Double-clicking still selects the word as normal. That is deliberate — the selection is preserved so the panel's Read selection button keeps working on the word you just looked up.
Availability
| Deliverable | Default | Notes |
|---|---|---|
| Extension | On | Users can turn it off in settings. |
| Widget | Off | Site owners opt in with wordLookup: true. |
It is off by default in the widget because a double-click anywhere on a customer's site would otherwise open a third-party Irish dictionary over their page — surprising for a visitor who was only selecting text.
Removing the feature entirely
Setting disableTeanglann: true in window.WebReaderConfig is a hard lock, not a default:
- No double-click lookup and no
Alt+L. - The toggle is hidden from the panel, so a visitor cannot re-enable it.
- Applied on every load, so a previously stored
wordLookup: truecannot resurrect it.
Use this on sites that must not embed third-party frames, or where frame-src https://www.teanglann.ie cannot be added to the Content Security Policy.
Privacy and security notes
Worth knowing before enabling it on a site you are responsible for:
- The looked-up word is sent to teanglann.ie as a URL parameter.
- The iframe carries
referrerpolicy="no-referrer", so teanglann.ie is not told which page the visitor was reading. - The iframe is sandboxed (
allow-scripts allow-popups allow-popups-to-escape-sandbox) and is not grantedallow-same-origin, so it runs in an opaque origin with no access to cookies or storage. - Your CSP needs
frame-src https://www.teanglann.iefor the popover to render.
Where the code lives
| Concern | File |
|---|---|
| Popover, triggers, iframe | content/lookup-popover.js |
| Dictionary URL constants | shared/constants.js → TEANGLANN_LOOKUP_* |
| Hard-lock setting | shared/constants.js → disableTeanglann |
Last updated 2026-07-22